﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lm.InferenceEngine.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            var root = new ThroughBridge()
            {
                Farmer = FarmerPostion.Left,
                Left1 = true,
                Left2 = true,
                Left3 = true,
                Right1 = false,
                Right2 = false,
                Right3 = false,
                Status = InferenceStatus.Normal,
            };
            var computer = new Lm.InferenceEngine.InferenceComputer(root);
            computer.Compute();
            var result = computer.GetResult();
            var sortedList = result.OrderBy(t => t.AncestorsCount()).ToList();
            foreach (var r in sortedList)
            {
                var str = r.GetRoad();
                Console.WriteLine(str);
                Console.WriteLine("按任回车键显示下一个方案");
                Console.Read();
            }
            Console.WriteLine("结束");
            Console.Read();
        }
    }
}
